package net.facelib.live;

import net.gdface.sdk.CodeInfo;
import net.gdface.sdk.EyeInfo;
import net.gdface.sdk.FAngle;
import net.gdface.sdk.FInt2;
import net.gdface.sdk.FRect;

import static net.gdface.utils.ConditionChecks.checkNotNull;

/**
 * 包含活体检测结果的{@link CodeInfo}对象
 * @author guyadong
 *
 */
public class LiveCodeInfo extends CodeInfo {
	private static final long serialVersionUID = 1L;
	private LiveStatus liveStatus;
	private double scope;
	public LiveCodeInfo() {
	}

	public LiveCodeInfo(byte[] code, FRect pos, EyeInfo ei, FInt2 mouth, FInt2 nose, FAngle angle, byte[] facialData,LiveStatus liveStatus,double scope) {
		super(code, pos, ei, mouth, nose, angle, facialData);
		setLiveStatus(liveStatus);
		setScope(scope);
	}
	public LiveCodeInfo(CodeInfo codeInfo,LiveStatus liveStatus,double scope) {
		this(checkNotNull(codeInfo,"codeInfo is null").getCode(), codeInfo.getPos(), codeInfo.getEi(), codeInfo.getMouth(), codeInfo.getNose(), codeInfo.getAngle(), codeInfo.getFacialData(), liveStatus, scope);
	}

	public LiveStatus getLiveStatus() {
		return liveStatus;
	}

	public void setLiveStatus(LiveStatus liveStatus) {
		this.liveStatus = liveStatus;
	}

	public double getScope() {
		return scope;
	}

	public void setScope(double scope) {
		this.scope = scope;
	}
}
